﻿using Microsoft.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Idte.Application.Core.Actor
{
    public class AppRole
    {
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Guid Id { get; set; }

        public string Name
        {
            get { return SystemRole.Name;  }
            set { SystemRole.Name = value; }
        }
        public virtual IdentityRole SystemRole { get; set; }

        [ForeignKey("AppModelId")]
        public virtual ApplicationModel AppModel { get; set; }
        public virtual Guid AppModelId { get; set; }

        public virtual ICollection<UserAppRole> UserAppRoles { get; set; }
    }
}
